<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Hugo 0.101.0">
    <title>Content Management System</title>

    <link href="/assets/dist/css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body class="text-center">
    <%c include_sub("home/header",obj); %>
     <h3>article list 内容列表 <a href="/cms/add">(add)添加内容</a></h3>
     <p><%c echo<<obj["msg"].as_string(); %></p>
    <div class="list-group w-auto">
      <%c
      for(auto &a:obj["list"].as_array()){
      %>
      <div class="list-group-item list-group-item-action d-flex gap-3 py-3" aria-current="true">
        <img src="#" alt="Icon" class="rounded-circle flex-shrink-0" width="32" height="32">
        <div class="d-flex gap-2 w-100 justify-content-between">
          <div>
            <h6 class="mb-0"><a href="/cms/show?id=<%c echo<<a.second["aid"].to_string(); %>"><%c echo<<a.second["title"].as_string(); %></a></h6>
            <p class="mb-0 opacity-75"><%c echo<<a.second["summary"].as_string(); %></p>
          </div>
          <small class="opacity-50 text-nowrap"><%c echo<<a.second["createtime"].as_string(); %></small>

          <small class="opacity-50 text-nowrap"><a href="/cms/edit?id=<%c echo<<a.second["aid"].to_string(); %>">编辑(edit)</a></small>
          <small class="opacity-50 text-nowrap"><a href="/cms/delete?id=<%c echo<<a.second["aid"].to_string(); %>">删除(Delete)</a></small>
        </div>
      </div>
      <%c
      }
      %>  
       
    </div>

  </body>
  </html>